<template>
  <div class="">
    <div v-html="content"></div>
  </div>
</template>

<script>
import { ref, reactive, toRefs } from "vue";
import { useStore } from "vuex";
import { useRouter, useRoute } from "vue-router";
import { getDetail } from "../utils/api.js";
export default {
  setup(props, ctx) {
    const store = useStore();
    const router = useRouter();
    const route = useRoute();
    const data = reactive({
      content: "",
    });
    const id = route.params.id;
    getDetail({ id: id }).then((res) => {
      console.log(res);
      data.content = res.data.content;
    });

    return { ...toRefs(data) };
  },
};
</script>

<style lang="scss"></style>
